feat(vmcp): add support for ResourceLink content type#4023
Merged
amirejaz merged 3 commits intostacklok:mainfrom Mar 18, 2026
Merged
feat(vmcp): add support for ResourceLink content type#4023amirejaz merged 3 commits intostacklok:mainfrom
amirejaz merged 3 commits intostacklok:mainfrom
Conversation
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #4023 +/- ##
==========================================
- Coverage 69.04% 69.03% -0.01%
==========================================
Files 468 468
Lines 47003 47014 +11
==========================================
+ Hits 32453 32457 +4
+ Misses 11974 11945 -29
- Partials 2576 2612 +36 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Contributor
|
Hey @Sanskarzz thanks for the PR. I notice "[WIP]" in the PR description. Is this ready for review? |
jerm-dro
previously approved these changes
Mar 7, 2026
Contributor
Author
Apologies, my bad. The PR is ready to review. |
jerm-dro
previously approved these changes
Mar 9, 2026
Collaborator
|
These look ready to go, mind resolving the merge conflicts? we can merge then. |
Signed-off-by: Sanskarzz <sanskar.gur@gmail.com>
Signed-off-by: Sanskarzz <sanskar.gur@gmail.com>
d427091 to
b0b7f56
Compare
Contributor
Author
@JAORMX Done, Now its ready to merge. |
amirejaz
approved these changes
Mar 18, 2026
Sanskarzz
added a commit
to Sanskarzz/toolhive
that referenced
this pull request
Mar 23, 2026
* feat(vmcp): add support for ResourceLink content type Signed-off-by: Sanskarzz <sanskar.gur@gmail.com> * fix: added ContentType as a string alias in types.go Signed-off-by: Sanskarzz <sanskar.gur@gmail.com> * fix: lint Signed-off-by: Sanskarzz <sanskar.gur@gmail.com> --------- Signed-off-by: Sanskarzz <sanskar.gur@gmail.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
This PR implements support for the
ResourceLinkcontent type (type discriminant "resource_link") in the vMCP bridge layer. Previously,ResourceLinkcontent returned by backend MCP servers was unrecognized by the conversion layer, causing it to fall through to "unknown" and eventually be emitted as empty text, losing critical resource pointers and metadata.Key Changes
pkg/vmcp/types.goto include Name and Description fields, allowing it to faithfully represent a ResourceLink .contentTypeLinkconstant to pkg/vmcp/conversion/content.go. UpdatedConvertMCPContentto detectmcp.ResourceLinkvia type assertion and map it tovmcp.Content. UpdatedToMCPContentto reconstructmcp.ResourceLinkusingmcp.NewResourceLink.TestConvertMCPContentandTestToMCPContentinconversion_test.go. AddedTestResourceLinkRoundTripto verify that data is preserved when converting in both directions.Validation Results
All tests in pkg/vmcp/conversion and pkg/vmcp/server/adapter pass. go vet is clean.
Fixes #3960